﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Collections;
using WLWeb.PulbicClass;
using System.IO;
using System.Drawing;
using System.Text;

namespace WLWeb
{
    public partial class Index : System.Web.UI.Page
    {
        BLL.wlBLL.BLL_WebExample bllwebexample = new BLL.wlBLL.BLL_WebExample();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                InitData();
            }
        }

        protected void InitData()
        {
            DataTable dtqianyue = bllwebexample.GetTopActicleInfo(5, new Hashtable() { { "OtherCategoryGroup",Webpublic.GetGroupName(3) } });       //签约信息
            if (dtqianyue != null && dtqianyue.Rows.Count > 0)
            {
                repqianxue.DataSource = dtqianyue;
                repqianxue.DataBind();
            }
            DataTable dtsupport = bllwebexample.GetTopActicleInfo(5, new Hashtable() { { "OtherCategoryID", "773EE7AA-CE3A-470A-AF47-0BA9C3A5E82F" } });       //技术信息
            if (dtsupport != null && dtsupport.Rows.Count > 0)
            {
                repsupport.DataSource = dtsupport;
                repsupport.DataBind();
            }
            DataTable dtsupport1 = bllwebexample.GetTopActicleInfo(5, new Hashtable() { { "OtherCategoryID", "773EE7AA-CE3A-470A-AF47-0BA9C2A5E82F" } });       //常见问题
            if (dtsupport1 != null && dtsupport1.Rows.Count > 0)
            {
                repsupport1.DataSource = dtsupport1;
                repsupport1.DataBind();
            }
            DataTable dtnews = bllwebexample.GetTopActicleInfo(5, new Hashtable() { { "OtherCategoryGroup", Webpublic.GetGroupName(2) } });       //新闻信息
            if (dtnews != null && dtnews.Rows.Count > 0)
            {
                repnews.DataSource = dtnews;
                repnews.DataBind();
            }
            DataTable dtexample = bllwebexample.GetTopWebExampleInfo(5,new Hashtable() {});       //商品信息
            if (dtexample != null && dtexample.Rows.Count > 0)
            {
                repExample.DataSource = dtexample;
                repExample.DataBind();
                //repExample1.DataSource = dtexample;
                //repExample1.DataBind();
            }
        }
    }
}